<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>调试</title>
  <style>
    ol,
    ul {
      list-style: none;
      padding: 0;
    }
    body {
      perspective: 800px;
    }

    /* #cube {
      height: 200px;
      width: 200px;
      margin: 250px auto;
      animation: rotate1 5s linear infinite;
      transform-style: preserve-3d;
      transform-origin: center center 0;
    }

    #cube ul {
      height: 200px;
      width: 200px;
      position: relative;

    }

    #cube ul li {
      width: 200px;
      height: 200px;
      position: absolute;
      transition: 2s;
    }

    #cube ul img {
      width: 200px;
      height: 200px;
    } */

    #cube {
      height: 200px;
      width: 200px;
      margin: 250px auto;
      animation: rotate1 5s linear infinite;
      transform-style: preserve-3d;
      transform-origin: center center 0;
    }

    #cube ul {
      width: 200px;
      height: 200px;
      position: relative;
    }

    #cube ul img {
      width: 200px;
      height: 200px;
    }

    #cube ul li {
      width: 200px;
      height: 200px;
      position: absolute;
      transition: 2s;
    }


    /*外层盒子鼠标移入效果*/
    /* 正面 */
    #cube ul li:nth-child(1) {
      left: 0;
      top: 0;
      /* opacity: .4; */
      transform: translateZ(100px);
    }

    #cube:hover ul li:nth-child(1) {
      transform: translateZ(200px) scale(1.5);
      /* opacity: .6; */
    }

    /* 右边 */
    #cube ul li:nth-child(2) {
      left: 100px;
      top: 0;
      transform-origin: center;
      transform: rotateY(90deg);
      /* opacity: .4; */
    }

    #cube:hover ul li:nth-child(2) {
      transform: rotateY(90deg) translateZ(100px) scale(1.5);
      /* opacity: .6; */
    }

    /* 左边 */
    #cube ul li:nth-child(3) {
      left: -100px;
      top: 0;
      transform-origin: center;
      transform: rotateY(-90deg);
      /* opacity: .4; */
    }

    #cube:hover ul li:nth-child(3) {
      transform: rotateY(-90deg) translateZ(100px) scale(1.5);
      /* opacity: .6; */
    }

    /* 底部 */
    #cube ul li:nth-child(4) {
      left: 0;
      top: 100px;
      transform-origin: center;
      transform: rotateX(-90deg);
      /* opacity: .4; */
    }

    #cube:hover ul li:nth-child(4) {
      transform: rotateX(-90deg) translateZ(100px) scale(1.5);
      /* opacity: .6; */
    }

    /* 上面 */
    #cube ul li:nth-child(5) {
      left: 0;
      top: -100px;
      transform-origin: center;
      transform: rotateX(90deg);
      /* opacity: .4; */
    }

    #cube:hover ul li:nth-child(5) {
      transform: rotateX(90deg) translateZ(100px) scale(1.5);
      /* opacity: .6; */
    }

    /* 后面 */
    #cube ul li:nth-child(6) {
      left: 0;
      top: 0;
      transform: translateZ(-100px) rotate(180deg);
      /* opacity: .4; */
    }

    #cube:hover ul li:nth-child(6) {
      transform: rotate(180deg) translateZ(-200px) scale(1.5);
      /* opacity: .6; */
    }



    @keyframes rotate1 {
      0% {
        transform: rotateY(0);
      }

      100% {
        transform: rotateY(360deg);
      }
    }
  </style>
</head>

<body>
  <div id="cube">
    <ul>
      <li>
        <img src="images/1.jpg">
      </li>
      <li>
        <img src="images/2.jpg">
      </li>
      <li>
        <img src="images/3.jpg">
      </li>
      <li>
        <img src="images/4.jpg">
      </li>
      <li>
        <img src="images/5.jpg" >
      </li>
      <li>
        <img src="images/6.jpg" >
      </li>
    </ul>


    <!-- <ol>
      <li>
        <img src="images/01.jpg" >
      </li>
      <li>
        <img src="images/02.jpg" >
      </li>
      <li>
        <img src="images/03.jpg" >
      </li>
      <li>
        <img src="images/04.jpg" >
      </li>
      <li>
        <img src="images/05.jpg" >
      </li>
      <li>
        <img src="images/06.jpg" >
      </li>
    </ol> -->
  </div>

</body>

</html>